<?php

/**
 * sfGuardUser form.
 *
 * @package    
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id$
 */
class sfGuardUserForm extends PluginsfGuardUserForm
{
  public function configure()
  {
    unset(
      $this['is_super_admin'],
      $this['permissions_list']
    );
    
    $user_groups=Doctrine::getTable('sfGuardGroup')->findAll();
    
    $groups=array();
    foreach ($user_groups as $group)
      $groups[$group->id]=$group->description;
    
    $this->widgetSchema['groups_list']=new sfWidgetFormChoice(array(
      'expanded'=>false,
      'multiple' => false,
      'choices'=>$groups,
    ));
    
    $this->widgetSchema->setLabels(array(
      'username'=>'Логин',
      'password'=>'Пароль',
      'password2'=>'Повторить пароль',
      'is_active'=>'Регистрация подтверждена',
      'groups_list'=>'Группы',
      'permissions_list'=>'Права доступа',
    ));
  }
}
